<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>top10中访问会话session前十</title>
    <style type="text/css">
        table.altrowstable {
            font-family: verdana,arial,sans-serif;
            font-size:11px;
            color:#333333;
            border-width: 1px;
            border-color: #a9c6c9;
            border-collapse: collapse;
            margin:0 auto;
            width: 100%;
        }
        table.altrowstable th {
            border-width: 1px;
            padding: 8px;
            border-style: solid;
            border-color: #a9c6c9;
        }
        table.altrowstable td {
            border-width: 1px;
            padding: 8px;
            border-style: solid;
            border-color: #a9c6c9;
        }
        .oddrowcolor{
            background-color:#d4e3e5;
        }
        .evenrowcolor{
            background-color:#c3dde0;
        }
    </style>
    <script type="text/javascript">
        function altRows(id){
            if(document.getElementsByTagName){

                var table = document.getElementById(id);
                var rows = table.getElementsByTagName("tr");

                for(i = 0; i < rows.length; i++){
                    if(i % 2 == 0){
                        rows[i].className = "evenrowcolor";
                    }else{
                        rows[i].className = "oddrowcolor";
                    }
                }
            }
        }

        window.onload=function(){
            altRows('alternatecolor');
        }
    </script>
</head>
<body>
<h2>top10中访问会话session前十</h2>
<table border="1"   width="50%" class="altrowstable" id="alternatecolor" >
    <tr>

        <th>taskid</th>
        <th>category_id</th>
        <th>sessionid</th>

    </tr>
    <tr  th:each="u : ${top10Sessions}" >
        <td th:text="${u. getTask_id()}"></td>
        <td th:text="${u.getCategory_id()}"></td>
        <td th:text="${u.getSession_id()}"></td>



    </tr>
</table>

</body>
</html>

